import request from "@/utils/request";

/**
 *  获取员工的简单列表
 * **/
export function getEmployeeSimpleApi() {
  return request({
    url: "/sys/user/simple",
  });
}

// 查询列表
export const getEmployeesListApi = (params) => {
  return request({
    url: "/sys/user",
    method: "get",
    params,
  });
};
// 查询单个
export const getEmployeesInfoApi = (id) => {
  return request({
    url: "/sys/user/" + id,
    method: "get",
  });
};
// 添加
export const addEmployeesApi = (data) => {
  return request({
    url: "/sys/user",
    method: "post",
    data,
  });
};
// 修改
export const editEmployeesApi = (data) => {
  return request({
    url: "/sys/user/" + data.id,
    method: "put",
    data,
  });
};

// 删除
export const delEmployeesApi = (id) => {
  return request({
    url: "/sys/user/" + id,
    method: "delete",
  });
};
